Skip to main content

All Questions

-1votes
5answers
2kviews

In C++, does dereferencing a nullptr itself cause undefined behaviour, or is it the acting upon the dereferenced pointer which is undefined?

I happen to have a reason why I might want to dereference a nullptr. Of course when I do, my program crashes, and from what I gather, this is due to the compiler playing it safe and stopping my ...
Anon's user avatar
  • 3,633

close